using UnityEngine;
using UnityEngine.Playables;

public class RroundAnimMovePlayableAsset : PlayableAsset
{
    public ExposedReference<Transform> player;
    public ExposedReference<Transform> center;
    public bool forward;
    public float angleOffset;

    public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
    {
        var playable = ScriptPlayable<RroundAnimMovePlayableBehaviour>.Create(graph);
        var movePlayerBehaviour = playable.GetBehaviour();
        movePlayerBehaviour.player = player.Resolve(graph.GetResolver());
        movePlayerBehaviour.center = center.Resolve(graph.GetResolver()).position;
        movePlayerBehaviour.forward = forward;
        movePlayerBehaviour.angleOffset = angleOffset;
        return playable;
    }
}
